<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正文-首页</title>
    <link rel="stylesheet" href="./css/context.css">
    <link rel="stylesheet" href="./css/context_2.css">
    <link rel="stylesheet" href="control/css/pintuer.css?1.1">
    <link rel="stylesheet" href="control/css/admin.css?v1.1">
    <script src="control/js/jquery.js"></script>
    <script src="control/js/pintuer.js"></script>
</head>
<body style="background-color: #FFFFFF">
<style>

    a:hover{
        color: #C50C11;
    }

</style>

<?php
require_once ('control/pdo.php');

$sqlGetNewsInfoDJFB="select * from news_info a where a.news_type='党建发布' and a.status = '1' order by create_time desc limit 10";
$rsGetNewsInfoDJFB=$pdo->query($sqlGetNewsInfoDJFB);
$resultGetNewsInfoDJFB=$rsGetNewsInfoDJFB->fetch(PDO::FETCH_ASSOC);

$sqlGetNewsInfoSXLL="select * from news_info a where a.news_type='思想理论' and a.status='1' order by create_time desc limit 5";
$rsGetNewsInfoSXLL=$pdo->query($sqlGetNewsInfoSXLL);
$resultGetNewsInfoSXLL=$rsGetNewsInfoSXLL->fetch(PDO::FETCH_ASSOC);

$sqlGetNewsInfoGDDJ="select * from news_info a where a.news_type='各地党建' and a.status='1' order by create_time desc limit 5";
$rsGetNewsInfoGDDJ=$pdo->query($sqlGetNewsInfoGDDJ);
$resultGetNewsInfoGDDJ=$rsGetNewsInfoGDDJ->fetch(PDO::FETCH_ASSOC);

$sqlGetNewsInfoJZCM="select * from news_info a where a.news_type='警钟长鸣' and a.status='1' order by create_time desc limit 5";
$rsGetNewsInfoJZCM=$pdo->query($sqlGetNewsInfoJZCM);
$resultGetNewsInfoJZCM=$rsGetNewsInfoJZCM->fetch(PDO::FETCH_ASSOC);

$sqlGetNewsType = "select * from news_type_info a where a.status = '1'";
$rsGetNewsType = $pdo->query($sqlGetNewsType);
$resultGetNewsType = $rsGetNewsType->fetch(PDO::FETCH_ASSOC);

?>
<div class="main">
    <div class="inner" >

        <div class="dj2" >
            <div class="djfb">
                <div class="djfb-top" style="border-bottom: none;float: none;">
                    <h4><div style="float: none;">党建发布<a style="float: right;font-size: 14px;color: #999999" href="articlelist.php?uid=1" target="_self">更多</a></div></h4>
                    <div class="more1"><div class="jjt"></div></div>
                    <div class="clear"></div>
                </div>
                <div class="djfb-bottom">
                    <ul style="padding-left: 0px;" >
                        <?php
                            foreach ($pdo->query($sqlGetNewsInfoDJFB) as $key => $resultGetNewsInfoDJFB){?>
                                <li><a href="article.php?uid=<?=$resultGetNewsInfoDJFB['uid']?>" target="_blank"><?php echo "$resultGetNewsInfoDJFB[news_title]"?></a></li>
                        <?php
                            }
                        ?>
                    </ul>
                </div>
            </div>
            <div class="banner" style="height: 300px;width: 440px;float: left;margin-top:25px;margin-left: 15px;">
            <?php
            $sqlGetBreakingNewsInfo="select * from news_info a where a.is_breakingnews = '1' and status='1' order by create_time desc limit 3";
            $rsGetBreakingNewsInfo=$pdo->query($sqlGetBreakingNewsInfo);
            $resultGetBreakingNewsInfo=$rsGetBreakingNewsInfo->fetch(PDO::FETCH_ASSOC);

            foreach ($pdo->query($sqlGetBreakingNewsInfo) as $key => $resultGetBreakingNewsInfo){
                ?>
                <div class="carousel" data-pointer="0";>
                    <div class="item">
                        <div class="img-title" style="position: absolute;width: 100%;background: rgba(0,0,0,0.5);margin-bottom:10px;padding: 6px 0px 6px 3px;text-align: center"><a style="font-size: 14px" href="article.php?uid=<?=$resultGetBreakingNewsInfo['uid']?>" target="_blank"><?php echo "$resultGetBreakingNewsInfo[news_title]"?></a></div>
                        <a href="article.php?uid=<?=$resultGetBreakingNewsInfo['uid']?>" target="_blank"><img src="<?php echo "..\\code\\temp\\$resultGetBreakingNewsInfo[create_time]"?>" width="440" height="300"></a>
<!--                        linux-like环境使用下面语句 -->
<!--                        <a href="article.php?uid=--><?//=$resultGetBreakingNewsInfo['uid']?><!--" target="_blank"><img src="--><?php //echo "../code/temp/$resultGetBreakingNewsInfo[create_time]"?><!--" width="440" height="300"></a>-->
                        <p></p>
                    </div>
                </div>
                <?php
            }
            ?>

            </div>


            <div class="djrmt">
                <div class="djfb-top" style="border-bottom: none;float: none;">
                    <h4><div class="lx-rmt" style="border-top: none; border-right: none;  border-left: none; border-image: initial; font-weight: bold;float: none">党建电视</div>
                </div>
                <div class="djrmt-bottom lx-box" style="display: block;">
                    <div class="lx-ft">
                        <div class="img">

                            <a target="_blank"><img src="./css/W020180117532819413816.jpg" alt="1.jpg" title="" width="160" height="70"></a>

                        </div>
                        <div class="lx-p"><a href="articlelist.php?uid=5" target="_self">党<br>史<br>故<br>事</a></div>
                    </div>
                    <div class="lx-ft mt10">
                        <div class="img">

                            <a  target="_blank"><img src="./css/W020180131579816959766.jpg" alt="党建电视.jpg" title="" width="160" height="70"></a>

                        </div>
                        <div class="lx-p"><a href="articlelist.php?uid=5" target="_self">党<br>史<br>故<br>事</a></div>
                    </div>
                    <div class="lx-ft mt10">
                        <div class="img">

                            <a  target="_blank"><img src="./css/W020180211373995184847.jpg" alt="1.jpg" title="" width="160" height="70"></a>

                        </div>
                        <div class="lx-p"><a href="articlelist.php?uid=6" target="_self">党<br>校<br>工<br>作</a></div>
                    </div>
                    <div class="lx-ft mt10">
                        <div class="img">

                            <a  target="_blank"><img src="./css/W020180205526368896115.jpg" alt="党建电视.jpg" title="" width="160" height="70"></a>

                        </div>
                        <div class="lx-p"><a href="articlelist.php?uid=6" target="_self">党<br>校<br>工<br>作</a></div>
                    </div>
                </div>

            </div>
            <div class="clear"></div>
        </div>

        <div class="snlx">
            <div class="djfb">
                <div class="djfb-top" style="border-bottom: none;">
                    <h4><div style="float: none;">思想理论<a style="float: right;font-size: 14px;color: #999999" href="articlelist.php?uid=2" target="_self">更多</a></div></h4>
                    <div class="clear"></div>
                </div>
                <div class="djfb-bottom">
                    <ul style="padding-left: 0px;" >
                        <?php
                        foreach ($pdo->query($sqlGetNewsInfoSXLL) as $key => $resultGetNewsInfoSXLL){?>
                            <li><a href="article.php?uid=<?=$resultGetNewsInfoSXLL['uid']?>" target="_blank"><?php echo "$resultGetNewsInfoSXLL[news_title]"?></a></li>
                            <?php
                        }
                        ?>
                    </ul>
                </div>
            </div>

            <div class="djfb ml20">
                <div class="djfb-top" style="border-bottom: none;">
                    <h4><div style="float: none">各地党建<a style="float: right;font-size: 14px;color: #999999" href=articlelist.php?uid=3"" target="_self">更多</a></div></h4>
                    <div class="clear"></div>
                </div>
                <div class="djfb-bottom">
                    <ul style="padding-left: 0px;" >
                        <?php
                        foreach ($pdo->query($sqlGetNewsInfoGDDJ) as $key => $resultGetNewsInfoGDDJ){?>
                            <li><a href="article.php?uid=<?=$resultGetNewsInfoGDDJ['uid']?>" target="_blank"><?php echo "$resultGetNewsInfoGDDJ[news_title]"?></a></li>
                            <?php
                        }
                        ?>
                    </ul>
                </div>
            </div>

            <div class="djfb ml20">
                <div class="djfb-top" style="border-bottom: none;">
                    <h4><div style="float: none">警钟长鸣<a style="float: right;font-size: 14px;color: #999999" href="articlelist.php?uid=4" target="_self">更多</a></div></h4>
                    <div class="clear"></div>
                </div>
                <div class="djfb-bottom">
                    <ul style="padding-left: 0px;" >
                        <?php
                        foreach ($pdo->query($sqlGetNewsInfoJZCM) as $key => $resultGetNewsInfoJZCM){?>
                            <li><a href="article.php?uid=<?=$resultGetNewsInfoJZCM['uid']?>" target="_blank"><?php echo "$resultGetNewsInfoJZCM[news_title]"?></a></li>
                            <?php
                        }
                        ?>
                    </ul>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        
    </div>
</div>

</body>
</html>